package myjava.l_reflect.pojo;

/**
 * @Auther: cty
 * @Date: 2020/2/19 14:25
 * @Description:
 * @version: 1.0
 */
public class Student extends Person {
    public Student(){
        super();
    }

    public Student(String name, String sno, String sclass, int sgroup, boolean inLove) {
        super.name = name;
        this.sno = sno;
        this.sclass = sclass;
        this.sgroup = sgroup;
        this.inLove = inLove;
    }

    public String sno;  //学号
    public String sclass;  //班级
    public int sgroup;  //小组

    public boolean isStudyWell = true;  // 是否学习好
    public static boolean isGraduate = false;  //是否毕业
    private boolean inLove;  // 是否恋爱

    public void information(){
        System.out.println("我叫"+this.name+"，我的学号是"+sno+"，我在"+sclass+sgroup+"组。");
        if(inLove){
            System.out.println("另外，偷偷告诉你，我早恋了。");
        }
    }

    public void study(String str){
        System.out.println("我在学习，"+str);
    }

    public static void speak(String str){
        System.out.println(str);
    }

    public int doExercises(String sign, int a, int b){
        switch (sign){
            case "-":
                return a-b;
            case "*":
                return a*b;
            case "/":
                return a/b;
            default:
                return a+b;
        }
    }
}
